package com.zbkj.common.model.activity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 商户满减折扣表
 * </p>
 *
 * @author HZW
 * @since 2023-09-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_sfull_discount_activity")
@ApiModel(value="SfullDiscountActivity对象", description="商户满减折扣表")
public class SfullDiscountActivity implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "折扣满减活动ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @ApiModelProperty(value = "活动开始日期")
    private String startDate;

    @ApiModelProperty(value = "活动结束日期")
    private String endDate;

    @ApiModelProperty(value = "活动期间单笔下单购买次数，0不限制")
    private Integer oneQuota;

//    @ApiModelProperty(value = "全部活动期间，用户购买总数限制，0不限制")
//    private Integer allQuota;

    @ApiModelProperty(value = "用户类型 0-所有 1-新用户 2-老用户")
    private Integer userType;

    @ApiModelProperty(value = "活动类型 00-折扣 10-满减")
    private String activeType;

    @ApiModelProperty(value = "折扣比例")
    private BigDecimal discountRatio;

    @ApiModelProperty(value = "满减条件金额")
    private BigDecimal satisfyAmount;

    @ApiModelProperty(value = "满减金额")
    private BigDecimal fullDedAmount;

    @ApiModelProperty(value = "开启状态: 0=关闭 1=开启")
    private Integer isOpen;

    @ApiModelProperty(value = "状态:0未开始，1进行中，2已结束")
    private Integer status;

    @ApiModelProperty(value = "是否删除")
    private Boolean isDel;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(exist = false)
    private List<SfullDiscountProduct> productList;
}
